<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>BFC里面的元素不会影响外面的元素</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .box1 {
            width: 100px;
            height: 100px;
            background-color: #ff8000;

        }

        .box2 {
            width: 200px;
            height: 200px;
            background-color: #ff0000;
            display: inline-block;
        }
        .son {
            width: 100px;
            height: 100px;
            background: #000;
            margin-top: -50px;
        }
    </style>
</head>

<body>
    <div class="box1"></div>
    <div class="box2">
      <div class="son"></div>
    </div>
</body>
</html>